import {createApp} from 'vue'
import {createPinia} from 'pinia'

// import App from './App.vue'
import App from './Index.vue'
// import App from './components/Home.vue'
import router from './router'
import 'virtual:svg-icons-register'

const app = createApp(App)

// npm i vue-i18n@next --save
//1 vue-i18n 国际化插件 npm i vue-i18n --save
//2 在i18n目录下，建立index.ts
//3 导入index.ts
//4 app.use(i18n)
import i18n from '@/i18n'

i18n.global.locale = 'zhTw'
app.use(i18n)

import svg from '@/components/svgicon.vue'

app.component('SvgIcon', svg)

app.use(createPinia())
app.use(router)

//npm i element-plus --save
import ep from 'element-plus'
import 'element-plus/dist/index.css'

app.use(ep)

// 安装icons组件
// npm install @element-plus/icons-vue
import * as epi from '@element-plus/icons-vue'

for (const [key, component] of Object.entries(epi)) {
    app.component(key, component)
}


//npm install particles.vue3@2.9.3
//npm install tsparticles@2.9.3

import Particles from 'particles.vue3'

app.use(Particles)

app.mount('#app')
